*** // CPS replication file for the article: From Benefits and Benificiaries.
*** The Historical Origins of Old Age Pensions from a Political Regime Perspective // ***

*** Dropping missing values and second pension pillar observation ***
drop if dual_exclude == -66
drop if dual_exclude ==  1

*** // Defining and replacing variables // ***

 replace all_citizens = . if all_citizens == -66 | all_citizens == -88
 replace agri = . if agri == -66 | agri == -88
 replace exmaind = . if exmaind == -66 | exmaind == -88
 replace comfin = . if comfin == -66 | comfin == -88
 replace studapp = . if studapp == -66 | studapp == -88
 replace domwork = . if domwork == -66 | domwork == -88
 replace homework = . if homework == -66 | homework == -88
 replace selfempl = . if selfempl == -66 | selfempl == -88
 replace employer = . if employer == -66 | employer == -88
 replace tempwork = . if tempwork == -66 | tempwork == -88
 replace foreigner = . if foreigner == -66 | foreigner == -88
 
 replace all2 = . if all2 == - 66 | all2 == -88
 replace agri2 = . if agri2 == -66 | agri2 == -88
 replace exmaind2 = . if exmaind2 == -66 | exmaind2 == -88
 replace comfin2 = . if comfin2 == -66 | comfin2 == -88
 replace studapp2 = . if studapp2 == -66 | studapp2 == -88
 replace domwork2 = . if domwork2 == -66 | domwork2 == -88
 replace homework2 = . if homework2 == -66 | homework2 == -88
 replace selfempl2 = . if selfempl2 == -66 | selfempl2 == -88
 replace employer2 = . if employer2 == -66 | employer2 == -88
 replace tempwork2 = . if tempwork2 == -66 | tempwork2 == -88
 replace foreigner2 = . if foreigner2 == -66 | foreigner2 == -88

 
 replace reprate = . if reprate == -88 | reprate == -66
 
 replace reprate_min = . if reprate_min == -88 | reprate_min == -66
 
 replace reprate_max = . if reprate_max == -88 | reprate_max == -66
 

 replace sum1 = . if sum1 == -66 | sum1 == -88

 replace sum2 = . if sum2 == -66 | sum2 == -88
 

 replace f_employer = . if f_employer == -66 | f_employer == -88

 replace f_employee = . if f_employee == -66 | f_employee == -88
 
 replace f_state = . if f_state == -66 | f_state == -88
 
 
 replace f_employer1 = . if f_employer1 == -66 | f_employer1 == -88
  
 replace f_employee1 = . if f_employee1 == -66 | f_employee1 == -88

 replace f_state1 = . if f_state1 == -66 | f_state1 == -88
 
 
 replace contrireg_m = . if contrireg_m == -66 | contrireg_m == -88
 
 replace agereg_m = . if agereg_m == -66 | agereg_m == -88
 

 gen sumcontri =  f_employer1 + f_employee1
 
 gen financemode = .
 replace financemode = 1 if f_employer == 1 & f_employee == 1 & f_state == 1
 replace financemode = 2 if f_employer == 1 & f_employee == 1 & f_state == 0
 replace financemode = 3 if f_employer == 1 & f_employee == 0 & f_state == 0
 replace financemode = 4 if f_employer == 0 & f_employee == 1 & f_state == 0
 replace financemode = 5 if f_employer == 0 & f_employee == 0 & f_state == 1
 
 
 gen covhoriperc = (100/11) * sum1
 gen covvertiperc = (100/(sum1 * 5)) * sum2
 gen resumperc = (100/6) * re_sum
 
 gen covindex = (covhoriperc/100) * covvertiperc
 
 gen covindex1 = covindex
 replace covindex1 = 9.09 if pdesign == 3

 gen loggdp1 = log(gdp1)
 gen loggdp = log(gdp)
 gen logupop1 = log(upop1)
 gen logupop = log(upop)
 

gen bmrav3 = (bmr + bmr1 + bmr2)/3
gen polityav3 = (polity + polity1 + polity2)/3
gen polyav3 = (v2x_polyarchy + v2x_polyarchy1 + v2x_polyarchy2)/3

gen gdpav3 = (gdp + gdp1 + gdp2)/3
gen upopav3 = (upop + upop1 + upop2)/3

gen loggdpav3 = log(gdpav3)
gen logupopav3 = log(upopav3)

gen bmryear = bmr1 * year
gen polityyear = polity1 * year
gen polyyear = v2x_polyarchy1 * year

gen decade11 = .
replace decade11 = 1 if decade == 1880
replace decade11 = 2 if decade == 1890
replace decade11 = 3 if decade == 1900
replace decade11 = 4 if decade == 1910
replace decade11 = 5 if decade == 1920
replace decade11 = 6 if decade == 1930
replace decade11 = 7 if decade == 1940
replace decade11 = 8 if decade == 1950
replace decade11 = 9 if decade == 1960
replace decade11 = 10 if decade == 1970
replace decade11 = 11 if decade == 1980
replace decade11 = 12 if decade == 1990
replace decade11 = 13 if decade == 2000
replace decade11 = 14 if decade == 2010

gen decade2 = .
replace decade2 = 1 if decade == 1880
replace decade2 = 1 if decade == 1890
replace decade2 = 2 if decade == 1900
replace decade2 = 2 if decade == 1910
replace decade2 = 3 if decade == 1920
replace decade2 = 3 if decade == 1930
replace decade2 = 4 if decade == 1940
replace decade2 = 4 if decade == 1950
replace decade2 = 5 if decade == 1960
replace decade2 = 5 if decade == 1970
replace decade2 = 6 if decade == 1980
replace decade2 = 6 if decade == 1990
replace decade2 = 7 if decade == 2000
replace decade2 = 7 if decade == 2010


gen decade3 = .
replace decade3 = 1 if decade == 1880
replace decade3 = 1 if decade == 1890
replace decade3 = 1 if decade == 1900
replace decade3 = 2 if decade == 1910
replace decade3 = 2 if decade == 1920
replace decade3 = 2 if decade == 1930
replace decade3 = 3 if decade == 1940
replace decade3 = 3 if decade == 1950
replace decade3 = 3 if decade == 1960
replace decade3 = 4 if decade == 1970
replace decade3 = 4 if decade == 1980
replace decade3 = 4 if decade == 1990
replace decade3 = 5 if decade == 2000
replace decade3 = 5 if decade == 2010

gen decade4 = .
replace decade4 = 1 if decade == 1880
replace decade4 = 1 if decade == 1890
replace decade4 = 1 if decade == 1900
replace decade4 = 1 if decade == 1910
replace decade4 = 2 if decade == 1920
replace decade4 = 2 if decade == 1930
replace decade4 = 2 if decade == 1940
replace decade4 = 2 if decade == 1950
replace decade4 = 3 if decade == 1960
replace decade4 = 3 if decade == 1970
replace decade4 = 3 if decade == 1980
replace decade4 = 3 if decade == 1990
replace decade4 = 4 if decade == 2000
replace decade4 = 4 if decade == 2010

gen means1 = .
replace means1 = 1 if pdesign == 3
replace means1 = 0 if pdesign != 3

*** FIGURES AND TABLES ***
 
 *** Figure 1: Pension coverage rates (without means-tested programs) and pension replacement rates ***
 
set scheme s1mono
 
label define bmrname 0 "Nondemocratic Regimes" 1 "Democratic Regimes"
label values bmr bmrname
 
#delimit;
graph bar covindex,over(bmr) blabel(total, format(%9.2f))
title("") ytitle("Legal Pension Coverage Rates") ylabel(0 (20) 100, angle(0)) name(fig1, replace);
 
 
#delimit;
graph bar reprate,over(bmr) blabel(total, format(%9.2f))
title("") ytitle("Pension Replacement Rates") ylabel(0 (20) 100, angle(0)) name(fig2, replace);

graph combine fig1 fig2, rows(1)

//------------------------------------------------------------------------------
*** Pension coverage rates (without means-tested programs) and pension replacement rates and lagged regime indicator***

label define bmrname 0 "Nondemocratic Regimes" 1 "Democratic Regimes"
label values bmr1 bmrname

#delimit;
graph bar covindex,over(bmr1) blabel(total, format(%9.2f))
title("") ytitle("Legal Pension Coverage Rates") ylabel(0 (20) 100, angle(0)) name(fig13, replace);
 
#delimit;
graph bar reprate,over(bmr1) blabel(total, format(%9.2f))
title("") ytitle("Pension Replacement Rates") ylabel(0 (20) 100, angle(0)) name(fig23, replace);

graph combine fig13 fig23, rows(1)
//------------------------------------------------------------------------------
*** Figure 1.1: Pension coverage rates (without means-tested programs) and pension replacement rates; only depicted if both variables are available ***
 
 preserve
 
 list ccode_cow covindex reprate
 
 drop if ccode_cow == 20
 drop if ccode_cow == 145
 drop if ccode_cow == 155
 drop if ccode_cow == 200
 drop if ccode_cow == 210
 drop if ccode_cow == 211
 drop if ccode_cow == 220
 drop if ccode_cow == 360
 drop if ccode_cow == 375
 drop if ccode_cow == 390
 drop if ccode_cow == 411
 drop if ccode_cow == 432
 drop if ccode_cow == 433
 drop if ccode_cow == 437
 drop if ccode_cow == 438
 drop if ccode_cow == 452
 drop if ccode_cow == 475
 drop if ccode_cow == 484
 drop if ccode_cow == 500
 drop if ccode_cow == 501
 drop if ccode_cow == 510
 drop if ccode_cow == 541
 drop if ccode_cow == 551
 drop if ccode_cow == 560
 drop if ccode_cow == 570
 drop if ccode_cow == 572
 drop if ccode_cow == 580
 drop if ccode_cow == 660
 drop if ccode_cow == 670
 drop if ccode_cow == 698
 drop if ccode_cow == 713
 drop if ccode_cow == 750
 drop if ccode_cow == 771
 drop if ccode_cow == 780
 drop if ccode_cow == 811
 drop if ccode_cow == 812
 drop if ccode_cow == 850
 drop if ccode_cow == 900
 drop if ccode_cow == 910
 drop if ccode_cow == 935
 drop if ccode_cow == 972
 drop if ccode_cow == 223
 drop if ccode_cow == 652
 drop if ccode_cow == 947
 drop if ccode_cow == 781
 drop if ccode_cow == 221
 drop if ccode_cow == 990

 #delimit;
graph bar covindex,over(bmr) blabel(total, format(%9.2f))
title("") ytitle("Legal Pension Coverage Rates") ylabel(0 (20) 100, angle(0)) name(fig312, replace);
 
#delimit;
graph bar reprate,over(bmr) blabel(total, format(%9.2f))
title("") ytitle("Pension Replacement Rates") ylabel(0 (20) 100, angle(0)) name(fig323, replace);

graph combine fig312 fig323, rows(1)

restore
 
 //-----------------------------------------------------------------------------
 *** Figure 1.2: Pension coverage rates (with means-tested programs) and pension replacement rates; only depicted if both variables are available ***
 preserve
 
 list ccode_cow covindex1 reprate
 
 drop if ccode_cow == 145
 drop if ccode_cow == 155
 drop if ccode_cow == 210
 drop if ccode_cow == 211
 drop if ccode_cow == 360
 drop if ccode_cow == 375
 drop if ccode_cow == 390
 drop if ccode_cow == 411
 drop if ccode_cow == 432
 drop if ccode_cow == 433
 drop if ccode_cow == 437
 drop if ccode_cow == 438
 drop if ccode_cow == 452
 drop if ccode_cow == 475
 drop if ccode_cow == 484
 drop if ccode_cow == 500
 drop if ccode_cow == 501
 drop if ccode_cow == 510
 drop if ccode_cow == 541
 drop if ccode_cow == 551
 drop if ccode_cow == 560
 drop if ccode_cow == 570
 drop if ccode_cow == 572
 drop if ccode_cow == 580
 drop if ccode_cow == 660
 drop if ccode_cow == 698
 drop if ccode_cow == 713
 drop if ccode_cow == 750
 drop if ccode_cow == 780
 drop if ccode_cow == 811
 drop if ccode_cow == 812
 drop if ccode_cow == 850
 drop if ccode_cow == 910
 drop if ccode_cow == 935
 drop if ccode_cow == 972
 drop if ccode_cow == 223
 drop if ccode_cow == 652
 drop if ccode_cow == 947
 drop if ccode_cow == 781
 drop if ccode_cow == 221
 drop if ccode_cow == 990

  #delimit;
graph bar covindex1,over(bmr) blabel(total, format(%9.2f))
title("") ytitle("Legal Pension Coverage Rates") ylabel(0 (20) 100, angle(0)) name(fig122, replace);
 

#delimit;
graph bar reprate,over(bmr) blabel(total, format(%9.2f))
title("") ytitle("Pension Replacement Rates") ylabel(0 (20) 100, angle(0)) name(fig1122, replace);

graph combine fig122 fig1122, rows(1)
 
restore
//------------------------------------------------------------------------------ 
 *** Figure 2: Sectoral pension coverage ***
 
preserve
drop if pdesign == 3


label define bmrlab 0 "Nondemocratic Regimes" 1 "Democratic Regimes"
label value bmr bmrlab

gen all_cit100 = 0 if all_citizens == 0
replace all_cit100 = 100 if all_citizens == 1

gen agri100 = 0 if agri == 0
replace agri100 = 100 if agri == 1

gen exmaind100 = 0 if exmaind == 0
replace exmaind100 = 100 if exmaind == 1

gen comfin100 = 0 if comfin == 0
replace comfin100 = 100 if comfin == 1

gen studapp100 = 0 if studapp == 0
replace studapp100 = 100 if studapp == 1

gen domwork100 = 0 if domwork == 0
replace domwork100 = 100 if domwork == 1

gen homework100 = 0 if homework == 0
replace homework100 = 100 if homework == 1

gen selfempl100 = 0 if selfempl == 0
replace selfempl100 = 100 if selfempl == 1

gen employer100 = 0 if employer == 0
replace employer100 = 100 if employer == 1

gen tempwork100 = 0 if tempwork == 0
replace tempwork100 = 100 if tempwork == 1

gen foreigner100 = 0 if foreigner == 0
replace foreigner100 = 100 if foreigner == 1

graph bar all_cit100 agri100 exmaind100 comfin100 studapp100 domwork100 homework100 selfempl100 employer100 tempwork100 foreigner100, over(bmr)

restore
//------------------------------------------------------------------------------
*** Figure 2.1: Sectoral pension coverage without universal pensions ***
preserve
drop if pdesign == 3
drop if pdesign == 2

label define bmrlab 0 "Nondemocratic Regimes" 1 "Democratic Regimes"
label value bmr bmrlab

gen all_cit101 = 0 if all_citizens == 0
replace all_cit101 = 100 if all_citizens == 1

gen agri101 = 0 if agri == 0
replace agri101 = 100 if agri == 1

gen exmaind101 = 0 if exmaind == 0
replace exmaind101 = 100 if exmaind == 1

gen comfin101 = 0 if comfin == 0
replace comfin101 = 100 if comfin == 1

gen studapp101 = 0 if studapp == 0
replace studapp101 = 100 if studapp == 1

gen domwork101 = 0 if domwork == 0
replace domwork101 = 100 if domwork == 1

gen homework101 = 0 if homework == 0
replace homework101 = 100 if homework == 1

gen selfempl101 = 0 if selfempl == 0
replace selfempl101 = 100 if selfempl == 1

gen employer101 = 0 if employer == 0
replace employer101 = 100 if employer == 1

gen tempwork101 = 0 if tempwork == 0
replace tempwork101 = 100 if tempwork == 1

gen foreigner101 = 0 if foreigner == 0
replace foreigner101 = 100 if foreigner == 1

graph bar all_cit101 agri101 exmaind101 comfin101 studapp101 domwork101 homework101 selfempl101 employer101 tempwork101 foreigner101, over(bmr)

restore

***// Please use STATA command clear and insert dataset again without dropping dual_exclude == 1 or == -66 command// ***

*** // Table 3: Pension designs from a political regime perspective with second pension pillar included// ***

tab pdesign bmr
*** // Table 3.1: Pension designs from a political regime perspective with second pension pillar excluded// ***
preserve
drop if dual_exclude == 1

tab pdesign bmr

restore

drop if dual_exclude == 1
drop if dual_exclude == -66
//------------------------------------------------------------------------------

*** REGRESSION RESULTS: OLS ***
 
*** Pre-tests: Table 4 ***
//------------------------------------------------------------------------------
reg covindex bmr1 loggdp1 logupop1 year i.region
linktest 
hettest 
ovtest
vif
predict a1, rstudent
stem a1
list a1 country
***// Influential observations: Congo, Brazzaville; Uruguay; Egypt; Israel// ***

reg covindex polity1 loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict a11, rstudent
stem a11
list a11 country
***// Influential observations: Urugay; Egypt; Israel // ***

reg covindex v2x_polyarchy1 loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict a111, rstudent
stem a111
list a111 country
***// Influential observations: Uruguay; Poland; Egyp // ***

reg covindex bmr1 loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict a2, rstudent
stem a2
list a2 country
***// Multicollinearity problem: decade11; Influential observations: Congo, Brazzaville; Chile; Israel // ***

reg covindex polity1 loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict a22, rstudent
stem a22
list a22 country
***//Multicollinearity problem: decade11; Uruguay; Luxembourg; Germany; Congo, Brazzaville; Egypt; Israel// ***

reg covindex v2x_polyarchy1 loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict a222, rstudent
stem a222
list a222 country
*** // Multicollinearity problem: decade11; Influential observations: Cuba; Chile; Germany; Egypt; Papua New Guinea  // ***

//------------------------------------------------------------------------------
*** // Table 4/

reg covindex bmr1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex polity1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex v2x_polyarchy1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif


reg covindex bmr1 loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity: decade11// ****

reg covindex polity1 loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
***// Multicollinearity: decade11 // ***

reg covindex v2x_polyarchy1 loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
***// Linktest not perfect; Multicollinearity: decade11 // ***
// -----------------------------------------------------------------------------

*** // Pre-tests: Table 4a //
bys decade11: gen decade11_singleton = (_N==1)

tab decade11_singleton

list covindex bmr1 loggdp1 logupop1 if region == 5

preserve
drop if region == 5

reg covindex bmr1 loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict a3, rstudent
stem a3
list a3 country
***// Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville // ***

reg covindex polity1 loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict a33, rstudent
stem a33
list a33 country
***// Influential observations: Uruguay; Egypt; Israel// ***

reg covindex v2x_polyarchy1 loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict a333, rstudent
stem a333
list a333 country
***// Influential observations: Poland; Uruguay; Egypt // ***


reg covindex bmr1 loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict a4, rstudent
stem a4
list a4 country

***// Omitted variable problem at 0.1 significance level; Influential observations: Uruguay; Egypt; Congo, Brazzaville // ***

reg covindex polity1 loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict a44, rstudent
stem a44
list a44 country
*** // Influential observations: Egypt // ***

reg covindex v2x_polyarchy1 loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict a444, rstudent
stem a444
list a444 country
***// Influential observations: Egypt; Cuba // ***
//------------------------------------------------------------------------------

*** // Table 4a // ***

reg covindex bmr1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex polity1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex v2x_polyarchy1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif


reg covindex bmr1 loggdp1 logupop1 i.decade4 i.region , ro
linktest 
ovtest
vif
***// Omitted variable problem: at 0.1 significance level // ***

reg covindex polity1 loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

reg covindex v2x_polyarchy1 loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

restore

// -----------------------------------------------------------------------------

*** // Pre-tests: Table 4b // ***

reg covindex1 bmr1 loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict a5, rstudent
stem a5
list a5 country
***// Linktest problematic (coverage rates of means-tested programs do not vary); Influential observations: Uruguay; Egypt; Israel; // ***

reg covindex1 polity1 loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict a55, rstudent
stem a55
list a55 country
***// Linktest problematic (coverage rates of means-tested programs do not vary); Influential observations: Uruguay; Egypt; Israel; // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict a555, rstudent
stem a555
list a555 country
***// Linktest problematic (coverage rates of means-tested programs do not vary); Influential observations: Sweden; Uruguay; Egypt; Israel; Bangladesh // *** 


reg covindex1 bmr1 loggdp1 logupop1 i.decade11 i.region
linktest
hettest
ovtest
vif
predict a6, rstudent
stem a6
list a6 country
***// Multicollinearity: decade11; Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 polity1 loggdp1 logupop1 i.decade11 i.region
linktest
hettest
ovtest
vif
predict a66, rstudent
stem a66
list a66 country
***// Multicollinearity: decade11; Influential observations: Uruguay; Luxembourg; El Salvador; Israel // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 i.decade11 i.region
linktest
hettest
ovtest
vif
predict a666, rstudent
stem a666
list a666 country
***// Multicollinearity: decade11; Influential observations: Chile; Egypt; El Salvador; Israel; Cuba; Bangladesh // ***
//------------------------------------------------------------------------------
*** // Table 4b // ***

reg covindex1 bmr1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif
***// Linktest problematic (coverage rates of means-tested programs do not vary)// ***

reg covindex1 polity1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif
***// Linktest problematic (coverage rates of means-tested programs do not vary) // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif
***// Linktest problematic (coverage rates of means-tested programs do not vary)// ***


reg covindex1 bmr1 loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity: decade11// ***

reg covindex1 polity1 loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity: decade11 // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity: decade11// ***
// -----------------------------------------------------------------------------

*** // Pre-tests: Table 4c // ***

reg covindex1 bmr1 loggdp1 logupop1 year means1 i.region
linktest
hettest
ovtest
vif
predict a7, rstudent
stem a7
list a7 country
***// Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville // ***

reg covindex1 polity1 loggdp1 logupop1 year means1 i.region
linktest
hettest
ovtest
vif
predict a77, rstudent
stem a77
list a77 country
***// Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year means1 i.region
linktest
hettest
ovtest
vif
predict a777, rstudent
stem a777
list a777 country
***// Influential observations: Uruguay; Egypt; Israel // ***


reg covindex1 bmr1 loggdp1 logupop1 i.decade11 means i.region
linktest
hettest
ovtest
vif
predict a8, rstudent
stem a8
list a8 country
***// Multicollinearity problem: decade11; Influential observations: Uruguay; Luxembourg; Egypt; Israel; Congo, Brazzaville // ***

reg covindex1 polity1 loggdp1 logupop1 i.decade11 means i.region
linktest
hettest
ovtest
vif
predict a88, rstudent
stem a88
list a88 country
***// Multicollinearity problem: decade1; Influential observations: Luxembourg; Egypt; Israel; Papua New Guinea // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 i.decade11 means i.region
linktest
hettest
ovtest
vif
predict a888, rstudent
stem a888
list a888 country
*** // Linktest problematic; Omitted variable problem; Multicollinearity problem: decade11; Influential observations: Egypt; Cuba// ***
//------------------------------------------------------------------------------

***// Table 4c // ***
reg covindex1 bmr1 loggdp1 logupop1 year means1 i.region , ro
linktest
ovtest
vif

reg covindex1 polity1 loggdp1 logupop1 year means1 i.region , ro
linktest
ovtest
vif

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year means1 i.region , ro
linktest
ovtest
vif


reg covindex1 bmr1 loggdp1 logupop1 i.decade11 means1 i.region , ro
linktest
ovtest
vif
***// Multicollinearity problem: decade11// ***

reg covindex1 polity1 loggdp1 logupop1 i.decade11 means1 i.region , ro
linktest
ovtest
vif
***// Multicollinearity problem: decade11// ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 i.decade11 means1 i.region , ro
linktest
ovtest
vif
***// Multicollinearity problem: decade11; Omitted variable problem; Linktest not perfect;  // ***

// -----------------------------------------------------------------------------

***// Pre-tests: Table 4d// ***

preserve


list covindex1 bmr1 loggdp1 logupop1 if region == 5
list covindex1 polity1 loggdp1 logupop1 if region == 5
list covindex1 v2x_polyarchy1 loggdp1 logupop1 if region == 5

drop if region == 5

reg covindex1 bmr1 loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict a9, rstudent
stem a9
list a9 country
***// Linktest problematic (coverage rates of means-tested programs do not vary); Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 polity1 loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict a99, rstudent
stem a99
list a99 country
*** // Linktest problematic (coverage rates of means-tested programs do not vary); Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict a999, rstudent
stem a999
list a999 country
*** // Linktest problematic (coverage rates of means-tested programs do not vary); Influential observations: Sweden; Uruguay; Egypt; Israel; Bangladesh// ***


reg covindex1 bmr1 loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict b1, rstudent
stem b1
list b1 country
*** // Linktest problematic (as coverage of means-tested programs is constant); Omitted variable problem; Influential observation: Uruguay; Egypt; Israel; Congo, Brazzaville // ***

reg covindex1 polity1 loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict b11, rstudent
stem b11
list b11 country
*** // Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict b111, rstudent
stem b111
list b111 country
*** //Influential observations: Denmark; Canada; Egypt // ***
//------------------------------------------------------------------------------
***// Table 4d // ***

reg covindex1 bmr1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif
*** // Linktest problematic (coverage rates of means-tested programs do not vary) // ***

reg covindex1 polity1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif
*** // Linktest problematic (coverage rates of means-tested programs do not vary) // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif
*** // Linktest problematic (coverage rates of means-tested programs do not vary) // ***

reg covindex1 bmr1 loggdp1 logupop1 i.decade4  i.region , ro
linktest
ovtest
vif
*** // Linktest problematic (coverage rates of means-tested programs do not vary); Omitted variable problem// ***

reg covindex1 polity1 loggdp1 logupop1 i.decade4  i.region , ro
linktest
ovtest
vif

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 i.decade4  i.region , ro
linktest
ovtest
vif

restore
// -----------------------------------------------------------------------------

*** // Pre-tests: Table 4e// ***

preserve
drop if region == 5

reg covindex1 bmr1 loggdp1 logupop1 year means i.region
linktest
hettest
ovtest
vif
predict b2, rstudent
stem b2
list b2 country
***// Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville // ***

reg covindex1 polity1 loggdp1 logupop1 year means1 i.region
linktest
hettest
ovtest
vif
predict b22, rstudent
stem b22
list b22 country
*** // Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year means1 i.region
linktest
hettest
ovtest
vif
predict b222, rstudent
stem b222
list b222 country
*** // Influential observations: Uruguay; Poland; Egypt; Israel // ***
//------------------------------------------------------------------------------

*** //Table 4e // ***

reg covindex1 bmr1 loggdp1 logupop1 year means1 i.region , ro
linktest
ovtest
vif

reg covindex1 polity1 loggdp1 logupop1 year means1 i.region , ro
linktest
ovtest
vif

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year means1 i.region , ro
linktest
ovtest
vif


reg covindex1 bmr1 loggdp1 logupop1 i.decade4 means i.region , ro
linktest
ovtest
vif
***// Omitted variable problem, however, only significant at 0.1 significance level// ***

reg covindex1 polity1 loggdp1 logupop1 i.decade4 means i.region , ro
linktest
ovtest
vif
*** // Slight multicollinearity: decade4 // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 i.decade4 means i.region , ro
linktest
ovtest
vif
*** //Linktest problematic;  Omitted variable problem, however, only significant at 0.1 significance level// ***

restore
//------------------------------------------------------------------------------

*** // Pre-tests: Table 4f // ***

reg covindex bmrbefore loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict b3, rstudent
stem b3
list b3 country
***// Influential observations: Uruguay; United States; Egypt; Israel // ***

reg covindex politybefore loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict b33, rstudent
stem b33
list b33 country
*** // Influential observations: Uruguay; Egypt; Israel // ***

reg covindex poly9before loggdp1 logupop1 year  i.region
linktest
hettest
ovtest
vif
predict b333, rstudent
stem b333
list b333 country
*** // Influential observations: Sweden; Uruguay; Egypt; Israel; Nepal // ***


reg covindex bmrbefore loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict b4, rstudent
stem b4
list b4 country
*** // Influential observations: United States; Egypt; Israel; Multicollinearity problem: decade11// ***

reg covindex politybefore loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict b44, rstudent
stem b44
list b44 country
*** // Influential observations: Uruguay; Finland; Israel; Egypt; Multicollinearity problem: decade11 // ***

reg covindex poly9before loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict b444, rstudent
stem b444
list b444 country
*** // Influential observations: Egypt; Israel; Nepal; Multicollinearity problem: decade11// ***
//------------------------------------------------------------------------------

*** // Table 4f // ***

reg covindex bmrbefore loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex politybefore loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex poly9before loggdp1 logupop1 year  i.region , ro
linktest
ovtest
vif


reg covindex bmrbefore loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem: decade11 // ***

reg covindex politybefore loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem: decade11 // ***

reg covindex poly9before loggdp1 logupop1 i.decade11  i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem: decade11 // ***
//------------------------------------------------------------------------------
***// Pre-tests: Table 4g // **

preserve
drop if region == 5

reg covindex bmrbefore loggdp1 logupop1 year i.region
linktest
hettest 
ovtest
vif
predict b5, rstudent
stem b5
list b5 country
*** // Influential observations: Uruguay; United States; Egypt; Israel // ***

reg covindex politybefore loggdp1 logupop1 year i.region
linktest
hettest 
ovtest
vif
predict b55, rstudent
stem b55
list b55 country
*** // Influential observations: Uruguay; Egypt; Israel// ***

reg covindex poly9before loggdp1 logupop1 year i.region
linktest
hettest 
ovtest
vif
predict b555, rstudent
stem b555
list b555 country
*** // Influential observations: Sweden; Uruguay; Egypt; Israel; Nepal// ***


reg covindex bmrbefore loggdp1 logupop1 i.decade4 i.region 
linktest
hettest 
ovtest
vif
predict b6, rstudent
stem b6
list b6 country
*** // Influential observations: United States; Egypt; Israel/ ***

reg covindex politybefore loggdp1 logupop1 i.decade4 i.region 
linktest
hettest
ovtest
vif
predict b66, rstudent
stem b66
list b66 country
***// Influential observations: Finland; Egypt; Israel/ ***

reg covindex poly9before loggdp1 logupop1 i.decade4 i.region 
linktest
hettest
ovtest
vif
predict b666, rstudent
stem b666
list b666 country
*** // Influential observations: Egypt; Israel; Nepal// ***
//------------------------------------------------------------------------------

*** // Table 4g // ***
reg covindex bmrbefore loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex politybefore loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex poly9before loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif


reg covindex bmrbefore loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

reg covindex politybefore loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

reg covindex poly9before loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

restore


// -----------------------------------------------------------------------------
*** // Pre-tests: Table 4h // ***

reg covindex1 bmrbefore loggdp1 logupop1 year i.region
linktest
hettest
ovtest 
vif
predict b7, rstudent
stem b7
list b7 country
*** // Influential observations: Sweden; Uruguay; Egypt; Israel // ***

reg covindex1 politybefore loggdp1 logupop1 year i.region
linktest
hettest
ovtest 
vif
predict b77, rstudent
stem b77
list b77 country
*** // Influential observations: Sweden; Uruguay; Egypt; Israel // ***

reg covindex1 poly9before loggdp1 logupop1 year i.region
linktest
hettest
ovtest 
vif
predict b777, rstudent
stem b777
list b777 country
*** // Influential observations: Sweden; Uruguay; Egypt; Israel // ***


reg covindex1 bmrbefore loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict b8, rstudent
stem b8
list b8 country
*** // Multicollinearity problem: decade11; Influential observations: Uruguay; Chile; Egypt; El Salvador; Israel// ***  

reg covindex1 politybefore loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict b88, rstudent
stem b88
list b88 country
***// Multicollinearity problem: decade11; Influential observations: Uruguay; Chile; Egypt; El Salvador; Israel // ***


reg covindex1 poly9before loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict b888, rstudent
stem b888
list b888 country
*** // Multicollinearity problem: decade11; Influential observations: Chile; Egypt; Israel; Nepal // ***

*** // Table 4h // ***

reg covindex1 bmrbefore loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex1 politybefore loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex1 poly9before loggdp1 logupop1 year  i.region , ro
linktest
ovtest
vif


reg covindex1 bmrbefore loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem // ***

reg covindex1 politybefore loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem // ***

reg covindex1 poly9before loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem // ***

//------------------------------------------------------------------------------
*** // Pre-tests: Table 4i // ***

preserve
drop if region == 5

reg covindex1 bmrbefore loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict b9, rstudent
stem b9
list b9 country
***// Influential observations: Sweden; Uruguay; Egypt; Israel// ***

reg covindex1 politybefore loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict b99, rstudent
stem b99
list b99 country
*** // Influential observations: Sweden; Uruguay; Egypt; Israel // ***

reg covindex1 poly9before loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict b999, rstudent
stem b999
list b999 country
*** // Influential observations: Sweden; Uruguay; Egypt; Israel// ***


reg covindex1 bmrbefore loggdp1 logupop1 i.decade4 i.region 
linktest
hettest
ovtest
vif
predict c1, rstudent
stem c1
list c1 country
*** //Influential observations: Denmark; Uruguay; Egypt; Israel // ***

reg covindex1 politybefore loggdp1 logupop1 i.decade4 i.region 
linktest
hettest
ovtest
vif
predict c11, rstudent
stem c11
list c11 country
***//Influential observations: Uruguay; Finland; Egypt; Israel  // ***

reg covindex1 poly9before loggdp1 logupop1 i.decade4 i.region 
linktest
hettest
ovtest
vif
predict c111, rstudent
stem c111
list c111 country
*** //Influential observations: Egypt; Israel // ***
//------------------------------------------------------------------------------
*** // Table 4i // ***

reg covindex1 bmrbefore loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex1 politybefore loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg covindex1 poly9before loggdp1 logupop1 year  i.region , ro
linktest
ovtest
vif


reg covindex1 bmrbefore loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

reg covindex1 politybefore loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

reg covindex1 poly9before loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

restore

//------------------------------------------------------------------------------
*** // Pre-tests: Table 5 // ***

reg covindex bmr1 loggdp1 logupop1 year bmryear i.region
linktest
hettest
ovtest
vif
predict c2, rstudent
stem c2
list c2 country
***// Influential observations: Uruguay; Israel; Congo, Brazzaville // ***

reg covindex polity1 loggdp1 logupop1 year polityyear i.region
linktest
hettest
ovtest
vif
predict c22, rstudent
stem c22
list c22 country
*** // Influential observations: Uruguay; Egypt; Israel // ***

reg covindex v2x_polyarchy1 loggdp1 logupop1 year polyyear i.region
linktest
hettest
ovtest
vif
predict c222, rstudent
stem c222
list c222 country
*** // Influential observations: Uruguay; Poland; Egypt;// ***
//------------------------------------------------------------------------------
***// Table 5 // ***
reg covindex bmr1 loggdp1 logupop1 year bmryear i.region , ro
linktest
ovtest
vif

reg covindex polity1 loggdp1 logupop1 year polityyear i.region , ro
linktest
ovtest
vif

reg covindex v2x_polyarchy1 loggdp1 logupop1 year polyyear i.region , ro
linktest
ovtest
vif
//------------------------------------------------------------------------------
*** // Pre-tests: Table 5a // ***

preserve
drop if region == 5

reg covindex bmr1 loggdp1 logupop1 year bmryear i.region
linktest
hettest
ovtest
vif
predict c3, rstudent
stem c3
list c3 country
*** // Influential observations: Egypt; Israel; Congo, Brazzaville // ***

reg covindex polity1 loggdp1 logupop1 year polityyear i.region
linktest
hettest
ovtest
vif
predict c33, rstudent
stem c33
list c33 country
*** //Influential observations: Uruguay; Egypt; Israel; // ***

reg covindex v2x_polyarchy1 loggdp1 logupop1 year polyyear i.region
linktest
hettest
ovtest
vif
predict c333, rstudent
stem c333
list c333 country
*** // Influential observations: Uruguay; Poland; Egypt // ***
//------------------------------------------------------------------------------

*** //  Table 5a // ***

reg covindex bmr1 loggdp1 logupop1 year bmryear i.region , ro
linktest
ovtest
vif

reg covindex polity1 loggdp1 logupop1 year polityyear i.region , ro
linktest
ovtest
vif

reg covindex v2x_polyarchy1 loggdp1 logupop1 year polyyear i.region , ro
linktest
ovtest
vif

restore
//------------------------------------------------------------------------------
*** // Pre-test:s Table 5b // ***

reg covindex1 bmr1 loggdp1 logupop1 year bmryear i.region
linktest
hettest
ovtest
vif
predict c4, rstudent
stem c4
list c4 country
*** // Omitted variable problem; Linktest problematic; Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 polity1 loggdp1 logupop1 year polityyear i.region
linktest
hettest
ovtest
vif
predict c44, rstudent
stem c44
list c44 country
*** // Linktest problematic: Influential observations: Uruguay; Egypt; Israel// ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year polyyear i.region
linktest
hettest
ovtest
vif
predict c444, rstudent
stem c444
list c444 country
*** // Linktest problematic: Influential observations: Sweden; Uruguay; Egypt; Israel; Bangladesh // ***
//------------------------------------------------------------------------------
*** // Table 5c // ***

reg covindex1 bmr1 loggdp1 logupop1 year bmryear i.region, ro
linktest
ovtest
vif
*** // Linktest problematic; Omitted variable problem // ***

reg covindex1 polity1 loggdp1 logupop1 year polityyear i.region , ro
linktest
ovtest
vif
*** // Linktest problematic // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year polyyear i.region , ro
linktest
ovtest
vif

//------------------------------------------------------------------------------
*** // Pre-tests: Table 5c // ***
preserve
drop if region == 5

reg covindex1 bmr1 loggdp1 logupop1 year bmryear means i.region
linktest
ovtest
hettest
vif
predict c5, rstudent
stem c5
list c5 country
*** // Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville // ***

reg covindex1 polity1 loggdp1 logupop1 year polityyear means i.region
linktest
ovtest
hettest
vif
predict c55, rstudent
stem c55
list c55 country
*** // Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year polyyear means i.region
linktest
ovtest
hettest
vif
predict c555, rstudent
stem c555
list c555 country
*** // Influential observations: Uruguay; Poland; Egypt// ***
//------------------------------------------------------------------------------

*** // Table 5c // ***
reg covindex1 bmr1 loggdp1 logupop1 year bmryear means i.region , ro
linktest
ovtest
vif

reg covindex1 polity1 loggdp1 logupop1 year polityyear means i.region , ro
linktest
ovtest
vif

reg covindex1 v2x_polyarchy1 loggdp1 logupop1 year polyyear means i.region , ro
linktest
ovtest
vif

restore
//------------------------------------------------------------------------------
*** // Pre-tests: Table 5d // ***

reg covindex bmrav3 loggdpav3 logupopav3 year i.region 
linktest
hettest
ovtest
vif
predict c6, rstudent
stem c6
list c6 country
*** //Omitted variable problem; Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville// ***

reg covindex polityav3 loggdpav3 logupopav3 year i.region 
linktest
hettest
ovtest
vif
predict c66, rstudent
stem c66
list c66 country
*** // Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville // ***

reg covindex polyav3 loggdpav3 logupopav3 year i.region 
linktest
hettest
ovtest
vif
predict c666, rstudent
stem c666
list c666 country
*** // Influential observations: Uruguay; Poland; Egypt/ ***


reg covindex bmrav3 loggdpav3 logupopav3 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict c7, rstudent
stem c7
list c7 country
*** // Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville // ***

reg covindex polityav3 loggdpav3 logupopav3 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict c77, rstudent
stem c77
list c77 country
*** // Influential observations: Luxembourg; Egypt; Israel // ***

reg covindex polyav3 loggdpav3 logupopav3 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict c777, rstudent
stem c777
list c777 country

*** // Influential observations: Chile; Egypt; Cuba// ***
//------------------------------------------------------------------------------
*** // Table 5d // ***

reg covindex bmrav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
vif
*** // Omitted variable bias; 0.1 significance level // ***

reg covindex polityav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
vif

reg covindex polyav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
vif


reg covindex bmrav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
vif
*** // Multicollinearity problem: decade11 *** //

reg covindex polityav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
vif
*** // Multicollinearity problem: decade11 *** //

reg covindex polyav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
vif
*** // Multicollinearity problem: decade11 *** //

//------------------------------------------------------------------------------
*** // Table 5e // ***

preserve
drop if region == 5

reg covindex bmrav3 loggdpav3 logupopav3 year i.region 
linktest
hettest
ovtest
vif
predict c8, rstudent
stem c8
list c8 country
*** // Omitted variable problem; Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville // ***

reg covindex polityav3 loggdpav3 logupopav3 year i.region 
linktest
hettest
ovtest
vif
predict c88, rstudent
stem c88
list c88 country
*** // Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville// ***

reg covindex polyav3 loggdpav3 logupopav3 year i.region 
linktest
hettest
ovtest
vif
predict c888, rstudent
stem c888
list c888 country
*** // Influential observations: Uruguay; Poland; Egypt // ***


reg covindex bmrav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
vif
predict c9, rstudent
stem c9
list c9 country
*** // Omitted variable problem; Influential observations: Uruguay; Egypt; Congo, Brazzaville // ***

reg covindex polityav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
vif
predict c99, rstudent
stem c99
list c99 country
*** // Influential observations: Egypt // ***

reg covindex polyav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
vif
predict c999, rstudent
stem c999
list c999 country

*** // Influential observations: Egypt; Cuba;  // ***
//------------------------------------------------------------------------------
*** // Table 5e // ***

reg covindex bmrav3 loggdpav3 logupopav3 year i.region , ro
linktest
ovtest
***// Omitted variable problem, 0.1 significance level // ***

reg covindex polityav3 loggdpav3 logupopav3 year i.region , ro
linktest
ovtest

reg covindex polyav3 loggdpav3 logupopav3 year i.region , ro
linktest
ovtest


reg covindex bmrav3 loggdpav3 logupopav3 i.decade4 i.region , ro
linktest
ovtest
*** // Omitted variable problem // ***

reg covindex polityav3 loggdpav3 logupopav3 i.decade4 i.region , ro
linktest
ovtest

reg covindex polyav3 loggdpav3 logupopav3 i.decade4 i.region , ro
linktest
ovtest

restore
//------------------------------------------------------------------------------

*** // Pre-tests: Table 5f // ***

reg covindex1 bmrav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d1, rstudent
stem d1
list d1 country
*** //Linktest problematic; Omitted variable problem; Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville// ***

reg covindex1 polityav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d11, rstudent
stem d11
list d11 country
*** // Linktest problematic; Influential observations: Uruguay; Egypt; Israel// ***

reg covindex1 polyav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d111, rstudent
stem d111
hilo d111 country
*** // Influential observations: Uruguay; Sweden; Egypt; Israel; Bangladesh // ***


reg covindex1 bmrav3 loggdpav3 logupopav3 i.decade11 i.region
linktest
hettest
ovtest
vif
predict d2, rstudent
stem d2
list d2 country
***//Multicollinearity problem: decade11; Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville// ***

reg covindex1 polityav3 loggdpav3 logupopav3 i.decade11 i.region
linktest
hettest
ovtest
vif
predict d22, rstudent
stem d22
list d22 country
*** // Multicollinearity problem: decade11; Influential observations: Uruguay; Luxembourg; Chile; Egypt; El Salvador; Israel; // ***


reg covindex1 polyav3 loggdpav3 logupopav3 i.decade11 i.region
linktest
hettest
ovtest
vif
predict d222, rstudent
stem d222
list d222  country
*** //Multicollinearity problem: decade11; Influential observations: Chile; Egypt; El Salvador; Israel; Bangladesh // ***
//------------------------------------------------------------------------------

*** // Table 5f // ***
reg covindex1 bmrav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
*** //Linktest problematic; Omitted variable problem // ***

reg covindex1 polityav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
*** // Linktest problematic, 0.1 significance level // ***

reg covindex1 polyav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
*** // Linktest problematic, 0.1 significance level // ***


reg covindex1 bmrav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
*** // Multicollinearity problem: decade11 // ***

reg covindex1 polityav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
*** // Multicollinearity problem: decade11 // ***

reg covindex1 polyav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
*** // Multicollinearity problem: decade11 // ***
//------------------------------------------------------------------------------
*** // Pre-tests: Table 5g // ***
preserve
drop if region == 5

reg covindex1 bmrav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d3, rstudent
stem  d3
list d3 country
*** // Omitted variable problem; Linktest problematic; Influential observations: Uruguay; Egypt; Israel; Congo, Brazzaville// ***

reg covindex1 polityav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d33, rstudent
stem d33
list d33 country
*** // Linktest problematic; Influential observations: Uruguay; Egypt; Israel; Madagascar // ***

reg covindex1 polyav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d333, rstudent
stem d333
list d333 country
*** // Linktest problematic; Influential observations: Sweden; Uruguay; Egypt; Israel; Bangladesh // ***


reg covindex1 bmrav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
predict d4, rstudent
stem  d4
list d4 country
*** // Omitted variable problem; Influential observations: Egypt; Congo, Brazzaville // ***

reg covindex1 polityav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
predict d44, rstudent
stem d44
list d44 country
*** // Influential observations: Uruguay; Egypt; Israel // ***

reg covindex1 polyav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
predict d444, rstudent
stem d444
list d444 country
*** // Influential observations: Denmark; Canada; Egypt // ***
//------------------------------------------------------------------------------
*** // Table 5g // ***

reg covindex1 bmrav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
*** // Linktest problematic; Omitted variable problem // **

reg covindex1 polityav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
*** // Linktest problematic // ***

reg covindex1 polyav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
*** // Linktest problematic // ***

reg covindex1 bmrav3 loggdpav3 logupopav3 i.decade4 i.region, ro
linktest
ovtest
*** // Omitted variable problem // ***

reg covindex1 polityav3 loggdpav3 logupopav3 i.decade4 i.region, ro
linktest
ovtest

reg covindex1 polyav3 loggdpav3 logupopav3 i.decade4 i.region, ro
linktest
ovtest
//------------------------------------------------------------------------------
*** // Table 5h // ***

reg covindex1 bmrav3 loggdpav3 logupopav3 year means1 i.region, ro
linktest
ovtest

reg covindex1 polityav3 loggdpav3 logupopav means1 year i.region, ro
linktest
ovtest

reg covindex1 polyav3 loggdpav3 logupopav3 means1 year i.region, ro
linktest
ovtest


reg covindex1 bmrav3 loggdpav3 logupopav3 means1 i.decade4  i.region, ro
linktest
ovtest
*** // Omitted variable problem; Linktest problematic // ***

reg covindex1 polityav3 loggdpav3 logupopav3 means1 i.decade4 i.region, ro
linktest
ovtest
*** // Omitted variable problem // ***

reg covindex1 polyav3 loggdpav3 logupopav3 means1 i.decade4 i.region, ro
linktest
ovtest

restore
//------------------------------------------------------------------------------

*** // REGRESSIONs: PENSION REPLACEMENT RATES // ***
*** // drop provident funds and mandatory account systems // ***
preserve
drop if pdesign == 5
drop if pdesign == 7
//------------------------------------------------------------------------------
***// Pre-tests: Table 6 // ***

reg reprate bmr1 loggdp1 logupop1 year i.region 
linktest
hettest
ovtest
vif
predict d5, rstudent
stem d5
list d5 country
*** // Problem: Heteroscedasticity; Influential observations: Austria-Hungary; Spain; Argentina; Kuwait// ***

reg reprate polity1 loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict d55, rstudent
stem d55
list d55 country
*** // Problem: Heteroscedasticity; Influential observations: Austria-Hungary; Argentina; Saudi Arabia; Kuwait// ***

reg reprate v2x_polyarchy1 loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict d555, rstudent
stem d555
list d555 country
*** // Problem: Heteroscedasticity; Influential observations: Austria-Hungary; Spain; Argentina; Kuwait// ***


reg reprate bmr1 loggdp1 logupop1  i.decade11 i.region
linktest
hettest
ovtest
vif
predict d6, rstudent
stem d6
list d6 country
*** //Problem: Heteroscedasticity; Multicollinearity problem: decade11; Influential observations: Austria-Hungary; Spain; Argentina; Kuwait // ***

reg reprate polity1 loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict d66, rstudent
stem d66
list d66 country
*** //Problem: Heteroscedasticity; Multicollinearity problem: decade11; Influential observations: Austria-Hungary; Mexico; Argentina; Saudi Arabia; Kuwait // ***

reg reprate v2x_polyarchy1 loggdp1 logupop1 i.decade11 i.region 
linktest
hettest
ovtest
vif
predict d666, rstudent
stem d666
list d666 country
*** //Problem: Heteroscedasticity; Multicollinearity problem: decade11; Influential observations: Austria-Hungary; Argentina // ***
//------------------------------------------------------------------------------
*** // Table 6 // ***

reg reprate bmr1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg reprate polity1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif

reg reprate v2x_polyarchy1 loggdp1 logupop1 year i.region , ro
linktest
ovtest
vif


reg reprate bmr1 loggdp1 logupop1  i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem // ***

reg reprate polity1 loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem // ***

reg reprate v2x_polyarchy1 loggdp1 logupop1 i.decade11 i.region , ro
linktest
ovtest
vif
*** // Multicollinearity problem // ***
restore

// -----------------------------------------------------------------------------
*** // Pre-tests: Table 6a// ***
preserve
drop if pdesign == 5
drop if pdesign == 7

list reprate bmr1 loggdp1 logupop1 if decade4 == 4
drop if decade4 == 4

reg reprate bmr1 loggdp1 logupop1  i.decade4 i.region 
linktest
hettest
ovtest
vif
predict d7, rstudent
stem d7
list d7 country
*** // Influential observations: Austria-Hungary; Argentina; Kuwait // ***

reg reprate polity1 loggdp1 logupop1  i.decade4 i.region 
linktest
hettest
ovtest
vif
predict d77, rstudent
stem d77
list d77 country
*** //Heteroscedasticity problem; Influential observations: Austria-Hungary; Mexico; Argentina; Saudi Arabia; Kuwait// ***

reg reprate v2x_polyarchy1 loggdp1 logupop1  i.decade4 i.region 
linktest
hettest
ovtest
vif
predict d777, rstudent
stem d777
list d777 country
*** // Influential observations: Austria-Hungary; Saudi Arabia; Argentina; Saudi Arabia; Kuwait// ***
//------------------------------------------------------------------------------
*** // Table 6a // ***
reg reprate bmr1 loggdp1 logupop1  i.decade4 i.region , ro
linktest
ovtest
vif

reg reprate polity1 loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

reg reprate v2x_polyarchy1 loggdp1 logupop1 i.decade4 i.region , ro
linktest
ovtest
vif

restore

//------------------------------------------------------------------------------
*** // Pre-tests: Table 7 // ***
preserve
drop if pdesign == 5
drop if pdesign == 7

reg reprate bmr1 loggdp1 logupop1 year bmryear i.region 
linktest
hettest
ovtest
vif
predict d8, rstudent
stem d8
list d8 country
*** // Heterosecdasticity problem; Influential observations: Austria-Hungary; Argentina// ***

reg reprate polity1 loggdp1 logupop1 year polityyear i.region 
linktest
hettest
ovtest
vif
predict d88, rstudent
stem d88
list d88 country
*** // Heterosecdasticity problem; Influential observations: Austria-Hungary; Saudi Arabia; Bulgaria; Kuwait; Argentina // ***

reg reprate v2x_polyarchy1 loggdp1 logupop1 year polyyear i.region 
linktest
hettest
ovtest
vif
predict d888, rstudent
stem d888
list d888 country
*** // Heterosecdasticity problem; Influential observations: Austria-Hungary; Spain; Argentina; Kuwait// ***
//------------------------------------------------------------------------------
*** // Table 7 // ***

reg reprate bmr1 loggdp1 logupop1 year bmryear i.region , ro
linktest
ovtest
vif

reg reprate polity1 loggdp1 logupop1 year polityyear i.region , ro
linktest
ovtest
vif

reg reprate v2x_polyarchy1 loggdp1 logupop1 year polyyear i.region , ro
linktest
ovtest
vif
 
 restore
//------------------------------------------------------------------------------
*** // Pre-tests: Table 7a // ***

preserve
drop if pdesign == 5
drop if pdesign == 7

reg reprate bmrav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d9, rstudent
stem d9
list d9 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Spain; Austria-Hungary; Kuwait // ***

reg reprate polityav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d99, rstudent
stem d99
list d99 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Austria-Hungary; Kuwait // ***

reg reprate polyav3 loggdpav3 logupopav3 year i.region
linktest
hettest
ovtest
vif
predict d999, rstudent
stem d999
list d999 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Kuwait// ***



reg reprate bmrav3 loggdpav3 logupopav3 i.decade11 i.region
linktest
hettest
ovtest
vif
predict e1, rstudent
stem e1
list e1 country 
*** // Heteroscedasticity problem; Multicollinearity problem; Influential observations: Argentina; Austria-Hungary; Kuwait// ***

reg reprate polityav3 loggdpav3 logupopav3 i.decade11 i.region
linktest
hettest
ovtest
vif
predict e11, rstudent
stem e11
list e11 country 
*** // Heteroscedasticity problem; Multicollinearity problem; Influential observations: Mexico; Argentina; Austria-Hungary; Saudi Arabia; Kuwait/ ***

reg reprate polyav3 loggdpav3 logupopav3 i.decade11 i.region
linktest
hettest
ovtest
vif
predict e111, rstudent
stem e111
list e111 country 
*** // Multicollinearity problem; Influential observations: Argentina; Austria-Hungary; Kuwait// ***
//------------------------------------------------------------------------------

*** // Table 7a // ***
reg reprate bmrav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
vif

reg reprate polityav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
vif

reg reprate polyav3 loggdpav3 logupopav3 year i.region, ro
linktest
ovtest
vif


reg reprate bmrav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
vif

reg reprate polityav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
vif

reg reprate polyav3 loggdpav3 logupopav3 i.decade11 i.region, ro
linktest
ovtest
vif

restore
//------------------------------------------------------------------------------

*** // Pre-tests: Table 7b // ***
preserve
drop if pdesign == 5
drop if pdesign == 7
drop if decade4 == 4

reg reprate bmrav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
vif
predict e2, rstudent
stem e2
list e2 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Austria-Hungary; Kuwait// ***

reg reprate polityav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
vif
predict e22, rstudent
stem e22
list e22 country 
*** // Heteroscedasticity problem; Influential observations: Mexico; Argentina; Saudi Arabia; Kuwait// ***

reg reprate polityav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
vif
predict e22, rstudent
stem e22
list e22 country 
*** // Heteroscedasticity problem; Influential observations: Mexico; Argentina; Saudi Arabia; Kuwait// ***

reg reprate polyav3 loggdpav3 logupopav3 i.decade4 i.region
linktest
hettest
ovtest
vif
predict e222, rstudent
stem e222
list e222 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Austria-Hungary; Saudi Arabia; Kuwait// ***
//------------------------------------------------------------------------------

*** // Table 7b // ***
reg reprate bmrav3 loggdpav3 logupopav3 i.decade4 i.region, ro
linktest
ovtest
vif

reg reprate polityav3 loggdpav3 logupopav3 i.decade4 i.region, ro
linktest
ovtest
vif

reg reprate polyav3 loggdpav3 logupopav3 i.decade4 i.region, ro
linktest
ovtest
vif

restore
//------------------------------------------------------------------------------

*** // Pre-tests: Table 7c // ***
preserve
drop if pdesign == 5
drop if pfdesign == 7

reg reprate bmrbefore loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict e3, rstudent
stem e3
list e3 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Austria-Hungary; Bulgaria; Kuwait// ***

reg reprate politybefore loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict e33, rstudent
stem e33
list e33 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Bulgaria; Kuwait// ***

reg reprate poly9before loggdp1 logupop1 year i.region
linktest
hettest
ovtest
vif
predict e333, rstudent
stem e333
list e333 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Austria-Hungary; Kuwait// ***


reg reprate bmrbefore loggdp1 logupop1 i.decade11 i.region
linktest
hettest
ovtest
vif
predict e4, rstudent
stem e4
list e4 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Kuwait// ***

reg reprate politybefore loggdp1 logupop1 i.decade11 i.region
linktest
hettest
ovtest
vif
predict e44, rstudent
stem e44
list e44 country 
*** // Heteroscedasticity problem; Influential observations: Argentina; Austria-Hungary; Kuwait// ***

reg reprate poly9before loggdp1 logupop1 i.decade11 i.region
linktest
hettest
ovtest
vif
predict e444, rstudent
stem e444
list e444 country 
*** // Heteroscedasticity problem; Omitted variable problem; Influential observations: Argentina; Kuwait // ***
//------------------------------------------------------------------------------

*** // Table 7c // ***
reg reprate bmrbefore loggdp1 logupop1 year i.region, ro
linktest
ovtest
vif

reg reprate politybefore loggdp1 logupop1 year i.region, ro
linktest
ovtest
vif

reg reprate poly9before loggdp1 logupop1 year i.region, ro
linktest
ovtest
vif


reg reprate bmrbefore loggdp1 logupop1 i.decade11 i.region, ro
linktest
ovtest
vif

reg reprate politybefore loggdp1 logupop1 i.decade11 i.region, ro
linktest
ovtest
vif

reg reprate poly9before loggdp1 logupop1 i.decade11 i.region, ro
linktest
ovtest
vif
*** // Omitted variable problem; 0.1 significance level // ***
restore
//------------------------------------------------------------------------------

*** //Pre-tests: Table 7d // ***
preserve
drop if pdesign == 5
drop if pdesign == 7

drop if decade4 == 4

reg reprate bmrbefore loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict e5, rstudent
stem e5
list e5 country 
*** // Influential observations: Argentina; Austria-Hungary; Kuwait // ***

reg reprate politybefore loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict e55, rstudent
stem e55
list e55 country 
*** // Influential observations: Argentina; Austria-Hungary; Kuwait // ***

reg reprate poly9before loggdp1 logupop1 i.decade4 i.region
linktest
hettest
ovtest
vif
predict e555, rstudent
stem e555
list e555 country 
*** //Omitted variable problem (0.1 significance level); Influential observations: Argentina; Italy; Kuwait// ***
//------------------------------------------------------------------------------

*** // Tabl 7d // ***
reg reprate bmrbefore loggdp1 logupop1 i.decade4 i.region, ro
linktest
ovtest
vif

reg reprate politybefore loggdp1 logupop1 i.decade4 i.region, ro
linktest
ovtest
vif

reg reprate poly9before loggdp1 logupop1 i.decade4 i.region, ro
linktest
ovtest
vif
*** //Omitted variable problem (0.1 significance level) // ***

restore
//------------------------------------------------------------------------------


*** HECKMAN SELECTION MODEL: Table 8 ***


heckman reprate bmr1 loggdp1 logupop1 year i.region, select(bmr1 britishcow frenchcow loggdp1) twostep
heckman reprate polity1 loggdp1 logupop1 year i.region, select(bmr1 britishcow frenchcow loggdp1) twostep
heckman reprate v2x_polyarchy1 loggdp1 logupop1 year i.region, select(bmr1 britishcow frenchcow loggdp1) twostep

heckman reprate bmr1 loggdp1 logupop1 i.decade11 i.region, select(bmr1 britishcow frenchcow loggdp1) twostep
heckman reprate polity1 loggdp1 logupop1 i.decade11 i.region, select(bmr1 britishcow frenchcow loggdp1) twostep
heckman reprate v2x_polyarchy1 loggdp1 logupop1 i.decade11 i.region, select(bmr1 britishcow frenchcow loggdp1) twostep




